//
//  RightDetailViewController.m
//  Daybook
//
//  Created by dllo on 16/5/28.
//  Copyright © 2016年 zhangbin. All rights reserved.
//

#import "RightDetailViewController.h"
#import "RightDetailView.h"
#import "Common.h"


@interface RightDetailViewController ()<RightDetailViewDelegate>

@end

@implementation RightDetailViewController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    self.navigationController.navigationBarHidden = YES;
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    self.navigationController.navigationBarHidden = NO;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self createView];
}

- (void)createView {
    RightDetailView *rightDetailView = [[RightDetailView alloc]initWithFrame:CGRectMake(0, 0, MAIN_WIDTH, MAIN_HEIGHT)];
    rightDetailView.rightDetailDelegate = self;
    rightDetailView.backgroundColor = [UIColor whiteColor];
    rightDetailView.topModel = _chartModel;
    [self.view addSubview:rightDetailView];
    
    
}

- (void)popViewController {
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)pushToIntroduceViewControllerWithModel:(RightDayModel *)model {
    IntroduceViewController *introduceVC = [IntroduceViewController new];
    introduceVC.model = model;
    [self.navigationController pushViewController:introduceVC animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
